package demo.terrain;

import static org.lwjgl.opengl.GL11.GL_DEPTH_TEST;
import static org.lwjgl.opengl.GL11.GL_LEQUAL;
import static org.lwjgl.opengl.GL11.GL_SMOOTH;
import static org.lwjgl.opengl.GL11.glDepthFunc;
import static org.lwjgl.opengl.GL11.glEnable;
import static org.lwjgl.opengl.GL11.glShadeModel;
import engine.core.OpenGLView;

public class TerrainDemo extends OpenGLView{

	public TerrainDemo(String title) {
		super(title, 1024, 768);
	}
	
	@Override
	public void init() {
		glEnable(GL_DEPTH_TEST);
		glShadeModel(GL_SMOOTH);
		glDepthFunc(GL_LEQUAL);
	}

	public static void main(String[] args) {
		TerrainDemo terrainDemo = new TerrainDemo("Terrain demo");
		terrainDemo.addScene(new SimpleTerrainScene());
		terrainDemo.setCurrentScene("terrain");
		new Thread(terrainDemo).start();
	}
}
